A = a b c d e f g h i j k
B = $(foreach f,$(A),$(f).o)

C = a b c d/

D = $(filter %/,$(C))
E = $(filter-out %/,$(C))

files = $(wildcard *.c)


all:
	@echo B = $(B)
	@echo D = $(D)
	@echo E = $(E)
	@echo files = $(files)
